package cn.zhiquxing.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 *责任链上下文
 * @param <T>
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class ProcessContext<T extends ProcessModel> implements Serializable {

    /**
     * 标记责任链的code
     */
    private String code;
    /**
     *存储责任链上下文数据的模型
     */
    private T processModel;
    /**
     *责任链中的中断标识
     */
    private Boolean needBreak;

    private BasicResultVO response;
}
